home *** CD-ROM | disk | FTP | other *** search
/ Softdisk for Windows 42 / Softdisk for Windows 42.iso / QUARRY / QUARRY.EXE / QUARRY.dxr / 00050_SETUPPUSHERS.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  1.7 KB  |  71 lines

  1. on SETUPPUSHERS
  2.   global PH, PUSHON, TURN, SOND, GRIDV, GOODROW, TEM, GOOD, NWGAME
  3.   set GOODROW to []
  4.   set PUSHON to 1
  5.   set TEM to 0
  6.   if NWGAME = 1 then
  7.     exit
  8.   end if
  9.   repeat with N = 11 to 24
  10.     if TURN = 2 then
  11.       set the castNum of sprite N to N + 120
  12.     end if
  13.     if TURN = 1 then
  14.       set the castNum of sprite N to N + 24
  15.     end if
  16.   end repeat
  17.   repeat with N = 31 to 44
  18.     if TURN = 2 then
  19.       set the castNum of sprite N to N + 115
  20.     end if
  21.     if TURN = 1 then
  22.       set the castNum of sprite N to N + 23
  23.     end if
  24.   end repeat
  25.   repeat with N = 1 to 14
  26.     set TEM to N
  27.     if TURN = 1 then
  28.       repeat with NN = 1 to 10
  29.         if getAt(GRIDV, TEM) = 2 then
  30.           append(GOODROW, N)
  31.         end if
  32.         if getAt(GRIDV, TEM) = 2 then
  33.           exit repeat
  34.         end if
  35.         set TEM to TEM + 14
  36.       end repeat
  37.     end if
  38.     if TURN = 2 then
  39.       repeat with NN = 1 to 10
  40.         if getAt(GRIDV, TEM) = 3 then
  41.           append(GOODROW, N)
  42.         end if
  43.         if getAt(GRIDV, TEM) = 3 then
  44.           exit repeat
  45.         end if
  46.         set TEM to TEM + 14
  47.       end repeat
  48.     end if
  49.   end repeat
  50.   set PH to 0
  51.   repeat with N = 11 to 24
  52.     set PH to PH + 1
  53.     set GOOD to 0
  54.     repeat with C = 1 to count(GOODROW)
  55.       if PH = getAt(GOODROW, C) then
  56.         set GOOD to 1
  57.       end if
  58.     end repeat
  59.     if GOOD = 1 then
  60.       set the locH of sprite N to getAt(GRIDH, PH) + 3
  61.       set the locV of sprite N to getAt(GRIDY, 127) + 36
  62.       set the locH of sprite (N + 20) to getAt(GRIDH, PH)
  63.       set the locV of sprite (N + 20) to getAt(GRIDY, PH) - 96
  64.     end if
  65.   end repeat
  66.   if SOND = 0 then
  67.     puppetSound("SOND1")
  68.   end if
  69.   updateStage()
  70. end
  71.